-
Notifications
You must be signed in to change notification settings - Fork 14
feat(plugin-typescript): support multiple tsconfigs #1229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
View your CI Pipeline Execution ↗ for commit 28d9038
☁️ Nx Cloud last updated this comment at |
@code-pushup/ci
@code-pushup/cli
@code-pushup/core
@code-pushup/create-cli
@code-pushup/nx-plugin
@code-pushup/axe-plugin
@code-pushup/models
@code-pushup/coverage-plugin
@code-pushup/eslint-plugin
@code-pushup/js-packages-plugin
@code-pushup/jsdocs-plugin
@code-pushup/lighthouse-plugin
@code-pushup/typescript-plugin
@code-pushup/utils
commit: |
Code PushUp🤨 Code PushUp report has both improvements and regressions – compared current commit 681fd0b with previous commit d3230f1. 🕵️ See full comparison in Code PushUp portal 🔍 🏷️ Categories👍 2 groups improved, 👎 2 groups regressed, 👍 9 audits improved, 👎 5 audits regressed, 24 audits changed without impacting score🗃️ Groups
30 other groups are unchanged. 🛡️ Audits
641 other audits are unchanged. |
b9c748a to
8f419a0
Compare
Code PushUp🤨 Code PushUp report has both improvements and regressions – compared current commit 681fd0b with previous commit d3230f1. 💼 Project
|
| 🏷️ Category | ⭐ Previous score | ⭐ Current score | 🔄 Score change |
|---|---|---|---|
| Documentation | 🔴 45 | 🟡 60 | |
| Code coverage | 🟢 95 | 🟢 95 |
4 other categories are unchanged.
👍 1 group improved, 👎 1 group regressed, 👍 7 audits improved, 👎 1 audit regressed, 1 audit changed without impacting score
🗃️ Groups
| 🔌 Plugin | 🗃️ Group | ⭐ Previous score | ⭐ Current score | 🔄 Score change |
|---|---|---|---|---|
| JSDocs coverage | Documentation coverage | 🔴 45 | 🟡 60 | |
| Code coverage | Code coverage metrics | 🟢 95 | 🟢 95 |
13 other groups are unchanged.
🛡️ Audits
| 🔌 Plugin | 🛡️ Audit | 📏 Previous value | 📏 Current value | 🔄 Value change |
|---|---|---|---|---|
| JSDocs coverage | Properties coverage | 🟥 27 undocumented properties | 🟥 35 undocumented properties | |
| JSDocs coverage | Classes coverage | 🟨 3 undocumented classes | 🟨 2 undocumented classes | |
| JSDocs coverage | Methods coverage | 🟨 13 undocumented methods | 🟨 11 undocumented methods | |
| JSDocs coverage | Variables coverage | 🟥 49 undocumented variables | 🟥 50 undocumented variables | |
| JSDocs coverage | Types coverage | 🟥 66 undocumented types | 🟨 55 undocumented types | |
| JSDocs coverage | Functions coverage | 🟥 239 undocumented functions | 🟥 244 undocumented functions | |
| Code coverage | Function coverage | 🟩 96.2 % | 🟩 95.4 % | |
| Code coverage | Branch coverage | 🟩 91.8 % | 🟩 92 % | |
| Code coverage | Line coverage | 🟩 97.8 % | 🟩 97.8 % |
435 other audits are unchanged.
💼 Project plugin-coverage
🤨 Code PushUp report has both improvements and regressions.
🕵️ See full comparison in Code PushUp portal 🔍
| 🏷️ Category | ⭐ Previous score | ⭐ Current score | 🔄 Score change |
|---|---|---|---|
| Code coverage | 🟢 90 | 🟢 92 | |
| Documentation | 🟡 69 | 🟡 69 |
4 other categories are unchanged.
👍 1 group improved, 👎 1 group regressed, 👍 2 audits improved, 👎 1 audit regressed
🗃️ Groups
| 🔌 Plugin | 🗃️ Group | ⭐ Previous score | ⭐ Current score | 🔄 Score change |
|---|---|---|---|---|
| Code coverage | Code coverage metrics | 🟢 90 | 🟢 92 | |
| JSDocs coverage | Documentation coverage | 🟡 69 | 🟡 69 |
13 other groups are unchanged.
🛡️ Audits
| 🔌 Plugin | 🛡️ Audit | 📏 Previous value | 📏 Current value | 🔄 Value change |
|---|---|---|---|---|
| Code coverage | Function coverage | 🟩 90.6 % | 🟩 93.5 % | |
| JSDocs coverage | Functions coverage | 🟥 22 undocumented functions | 🟥 22 undocumented functions | |
| Code coverage | Line coverage | 🟨 88 % | 🟨 89.1 % |
441 other audits are unchanged.
💼 Project plugin-typescript
🤨 Code PushUp report has both improvements and regressions.
🕵️ See full comparison in Code PushUp portal 🔍
| 🏷️ Category | ⭐ Previous score | ⭐ Current score | 🔄 Score change |
|---|---|---|---|
| Code coverage | 🟡 87 | 🟡 89 | |
| Documentation | 🟡 73 | 🟡 73 |
4 other categories are unchanged.
👍 1 group improved, 👎 1 group regressed, 👍 2 audits improved, 👎 2 audits regressed, 2 audits changed without impacting score
🗃️ Groups
| 🔌 Plugin | 🗃️ Group | ⭐ Previous score | ⭐ Current score | 🔄 Score change |
|---|---|---|---|---|
| Code coverage | Code coverage metrics | 🟡 87 | 🟡 89 | |
| JSDocs coverage | Documentation coverage | 🟡 73 | 🟡 73 |
13 other groups are unchanged.
🛡️ Audits
| 🔌 Plugin | 🛡️ Audit | 📏 Previous value | 📏 Current value | 🔄 Value change |
|---|---|---|---|---|
| Code coverage | Function coverage | 🟨 88.9 % | 🟩 92.6 % | |
| JSDocs coverage | Variables coverage | 🟥 11 undocumented variables | 🟥 13 undocumented variables | |
| Code coverage | Branch coverage | 🟨 80.2 % | 🟨 79.4 % | |
| Code coverage | Line coverage | 🟩 95.5 % | 🟩 95.6 % | |
| JSDocs coverage | Functions coverage | 🟨 9 undocumented functions | 🟨 13 undocumented functions | |
| JSDocs coverage | Types coverage | 🟥 8 undocumented types | 🟥 11 undocumented types |
438 other audits are unchanged.
💼 Project plugin-eslint
🤨 Code PushUp report has both improvements and regressions.
🕵️ See full comparison in Code PushUp portal 🔍
| 🏷️ Category | ⭐ Previous score | ⭐ Current score | 🔄 Score change |
|---|---|---|---|
| Documentation | 🟡 67 | 🟡 67 | |
| Code coverage | 🟢 94 | 🟢 94 |
4 other categories are unchanged.
👍 1 group improved, 👎 1 group regressed, 👍 2 audits improved, 👎 2 audits regressed
🗃️ Groups
| 🔌 Plugin | 🗃️ Group | ⭐ Previous score | ⭐ Current score | 🔄 Score change |
|---|---|---|---|---|
| JSDocs coverage | Documentation coverage | 🟡 67 | 🟡 67 | |
| Code coverage | Code coverage metrics | 🟢 94 | 🟢 94 |
13 other groups are unchanged.
🛡️ Audits
| 🔌 Plugin | 🛡️ Audit | 📏 Previous value | 📏 Current value | 🔄 Value change |
|---|---|---|---|---|
| JSDocs coverage | Functions coverage | 🟥 48 undocumented functions | 🟥 48 undocumented functions | |
| Code coverage | Line coverage | 🟩 95 % | 🟩 95.3 % | |
| Code coverage | Branch coverage | 🟨 86.5 % | 🟨 86.8 % | |
| Code coverage | Function coverage | 🟩 98.2 % | 🟩 98.2 % |
440 other audits are unchanged.
💼 Project plugin-axe
🤨 Code PushUp report has both improvements and regressions.
🕵️ See full comparison in Code PushUp portal 🔍
| 🏷️ Category | ⭐ Previous score | ⭐ Current score | 🔄 Score change |
|---|---|---|---|
| Documentation | 🟡 70 | 🟡 70 | |
| Code coverage | 🟢 94 | 🟢 94 |
4 other categories are unchanged.
👍 1 group improved, 👎 1 group regressed, 👍 2 audits improved, 👎 1 audit regressed
🗃️ Groups
| 🔌 Plugin | 🗃️ Group | ⭐ Previous score | ⭐ Current score | 🔄 Score change |
|---|---|---|---|---|
| JSDocs coverage | Documentation coverage | 🟡 70 | 🟡 70 | |
| Code coverage | Code coverage metrics | 🟢 94 | 🟢 94 |
13 other groups are unchanged.
🛡️ Audits
| 🔌 Plugin | 🛡️ Audit | 📏 Previous value | 📏 Current value | 🔄 Value change |
|---|---|---|---|---|
| JSDocs coverage | Functions coverage | 🟨 12 undocumented functions | 🟨 12 undocumented functions | |
| Code coverage | Line coverage | 🟨 72.7 % | 🟨 73 % | |
| Code coverage | Branch coverage | 🟨 89.9 % | 🟩 90 % |
440 other audits are unchanged.
💼 Project create-cli
😟 Code PushUp report has regressed.
🕵️ See full comparison in Code PushUp portal 🔍
| 🏷️ Category | ⭐ Previous score | ⭐ Current score | 🔄 Score change |
|---|---|---|---|
| Code coverage | 🟢 96 | 🟢 96 |
5 other categories are unchanged.
👎 1 group regressed, 👎 1 audit regressed
🗃️ Groups
| 🔌 Plugin | 🗃️ Group | ⭐ Previous score | ⭐ Current score | 🔄 Score change |
|---|---|---|---|---|
| Code coverage | Code coverage metrics | 🟢 96 | 🟢 96 |
14 other groups are unchanged.
🛡️ Audits
| 🔌 Plugin | 🛡️ Audit | 📏 Previous value | 📏 Current value | 🔄 Value change |
|---|---|---|---|---|
| Code coverage | Branch coverage | 🟨 88.2 % | 🟨 87.5 % |
443 other audits are unchanged.
💼 Project ci
😟 Code PushUp report has regressed.
🕵️ See full comparison in Code PushUp portal 🔍
| 🏷️ Category | ⭐ Previous score | ⭐ Current score | 🔄 Score change |
|---|---|---|---|
| Code coverage | 🟢 92 | 🟢 92 |
5 other categories are unchanged.
👎 1 group regressed, 👎 1 audit regressed, 1 audit changed without impacting score
🗃️ Groups
| 🔌 Plugin | 🗃️ Group | ⭐ Previous score | ⭐ Current score | 🔄 Score change |
|---|---|---|---|---|
| Code coverage | Code coverage metrics | 🟢 92 | 🟢 92 |
14 other groups are unchanged.
🛡️ Audits
| 🔌 Plugin | 🛡️ Audit | 📏 Previous value | 📏 Current value | 🔄 Value change |
|---|---|---|---|---|
| Code coverage | Branch coverage | 🟨 83.6 % | 🟨 83.6 % | |
| Code coverage | Line coverage | 🟩 94.8 % | 🟩 94.8 % |
443 other audits are unchanged.
💼 Project models
🤨 Code PushUp report has both improvements and regressions.
🕵️ See full comparison in Code PushUp portal 🔍
| 🏷️ Category | ⭐ Previous score | ⭐ Current score | 🔄 Score change |
|---|---|---|---|
| Documentation | 🟡 66 | 🟡 66 | |
| Code coverage | 🟢 94 | 🟢 94 |
2 other categories are unchanged.
👍 1 group improved, 👎 1 group regressed, 👍 1 audit improved, 👎 1 audit regressed, 1 audit changed without impacting score
🗃️ Groups
| 🔌 Plugin | 🗃️ Group | ⭐ Previous score | ⭐ Current score | 🔄 Score change |
|---|---|---|---|---|
| JSDocs coverage | Documentation coverage | 🟡 66 | 🟡 66 | |
| Code coverage | Code coverage metrics | 🟢 94 | 🟢 94 |
10 other groups are unchanged.
🛡️ Audits
| 🔌 Plugin | 🛡️ Audit | 📏 Previous value | 📏 Current value | 🔄 Value change |
|---|---|---|---|---|
| JSDocs coverage | Variables coverage | 🟥 72 undocumented variables | 🟥 76 undocumented variables | |
| Code coverage | Line coverage | 🟩 99.4 % | 🟩 99.4 % | |
| JSDocs coverage | Types coverage | 🟥 53 undocumented types | 🟥 57 undocumented types |
434 other audits are unchanged.
💼 Project core
🥳 Code PushUp report has improved.
🕵️ See full comparison in Code PushUp portal 🔍
| 🏷️ Category | ⭐ Previous score | ⭐ Current score | 🔄 Score change |
|---|---|---|---|
| Code coverage | 🟢 90 | 🟢 90 |
5 other categories are unchanged.
👍 1 group improved, 👍 1 audit improved
🗃️ Groups
| 🔌 Plugin | 🗃️ Group | ⭐ Previous score | ⭐ Current score | 🔄 Score change |
|---|---|---|---|---|
| Code coverage | Code coverage metrics | 🟢 90 | 🟢 90 |
14 other groups are unchanged.
🛡️ Audits
| 🔌 Plugin | 🛡️ Audit | 📏 Previous value | 📏 Current value | 🔄 Value change |
|---|---|---|---|---|
| Code coverage | Line coverage | 🟩 94.8 % | 🟩 94.8 % |
443 other audits are unchanged.
5 other projects are unchanged.
8f419a0 to
6122c13
Compare
| /** | ||
| * TypeScript config patterns to look for in each project. | ||
| */ | ||
| const TSCONFIG_PATTERNS = new Set([ | ||
| 'tsconfig.lib.json', | ||
| 'tsconfig.spec.json', | ||
| 'tsconfig.test.json', | ||
| 'tsconfig.app.json', | ||
| ]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on the VSCode Material Icon Theme, there are a lot more tsconfig file names in common use.
Moreover, your list is missing tsconfig.json!
I suggest we match any file named tsconfig.json or tsconfig.*.json, so that we don't have to maintain a long list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 for match naming pattern!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can match both tsconfig.json and tsconfig.*.json, explicitly exclude tsconfig.base.json by name, and filter out configs with empty files/include arrays. This way, we'll cover all naming conventions while still skipping the problematic ones.
The original list intentionally excluded tsconfig.json because in Nx monorepos, it's typically an empty config that only holds references to other config files. Including it would either check no files or cause duplicates. There's also a performance consideration: each tsconfig takes time to process (~40 seconds for all configs in this repo).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would go with:
const TSCONFIG_PATTERN = /^tsconfig(\..+)?\.json$/;This covers:
- tsconfig.json
- tsconfig.lib.json
- tsconfig..json
Explicitly exclude known aggregator configs:
const EXCLUDED_TSCONFIGS = new Set([
'tsconfig.base.json',
'tsconfig.json'
]);There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love it, thanks!
BioPhoton
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice extend of our typescript plugin! Left a comment.
BioPhoton
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the last refinement it looks perfect!
Closes #1217
tsconfigFromAllNxProjectshelper to auto-discover tsconfigs in Nx workspaces